﻿<%@ Page Title="كل الصور" Language="C#" MasterPageFile="~/DMaster.master" AutoEventWireup="true" CodeFile="AllPhotos.aspx.cs" Inherits="AllPhotos"meta:resourcekey="PageResource1" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
  <script type='text/javascript' src='swfobject.js'></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    
     <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true">
     
    <ContentTemplate>
    <br />
    <br />
    <%--<asp:FormView ID="FormView1" runat="server" BackColor="LightGoldenrodYellow" 
        BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black" DataSourceID="SqlDataSource1" AllowPaging="true">
        <FooterStyle BackColor="Tan" />
        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
            HorizontalAlign="Center" />
        <HeaderStyle BackColor="Tan" Font-Bold="True" />
        <EditRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
            <PagerSettings FirstPageImageUrl="~/icons/btn_page_first.png" LastPageImageUrl="~/icons/btn_page_last.png" NextPageImageUrl="~/icons/btn_page_next.png" PreviousPageImageUrl="~/icons/btn_page_prev.png" FirstPageText="الاولى" LastPageText="الاخير" NextPageText="التالى" PreviousPageText="السابق" Mode="NextPreviousFirstLast" Position="Bottom"/>
        <ItemTemplate>
        
     
 <div id="Scomment">
    <table width="100%">
<tr>
<td style="padding-right:10px;" align="center">
     <asp:Label ID="Label1" runat="server" Text=<%# Eval("scomment") %> Font-Bold="True"></asp:Label>
 </td>
</tr>
 </table>
    </div>
     <div  id="baselink" runat="server">
    </div>
    <div id="ifphoto" runat="server" style="padding:5px; width:800px; height:300px;"    visible="true">
   <table width="100%"> 
   <tr>
   <td align="center">
   <a target="_blank" href='<%# Eval("link") %>'>  <img align="middle" alt="" src='<%# Eval("link") %>' width="400px" height="300px" /></a>
   </td>
   </tr>
   </table>
    
     </div>

   
         <br />    
        </ItemTemplate>
        
    </asp:FormView>--%>
    <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" 
            RepeatColumns="3" CellPadding="5" CellSpacing="5" >
            <ItemTemplate>
           
           
           
          
                   
                     <a href='<%# "ShowMedia.aspx?id=" + Eval("id").ToString() %>'>
                    <asp:Image ID="Image1" runat="server" Height="122px" 
                    ImageUrl='<%# Eval("mtype").ToString()=="2"? Eval("link") :"images/videoplay.jpg" %>' Width="227px" />
                   <br />
                   <asp:Label ID="Label1" runat="server" Text='<%# (Eval("scomment").ToString().Length>=30) ? Eval("scomment").ToString().Substring(0,30)+"..." :Eval("scomment").ToString() %>' />
                   
                   </a>

            </ItemTemplate>
        </asp:DataList>
   
    </ContentTemplate>
    </asp:UpdatePanel>
<br /><br />
    <center>
    <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=141084795971760&amp;xfbml=1"></script>
    <fb:like href="<%=Request.Url.AbsoluteUri %>" send="true" width="450" show_faces="true" font="tahoma"></fb:like>
    </center>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        SelectCommand="SELECT [id], [scomment], [link], [mtype] FROM [media] where mtype=2 order by id desc">
    </asp:SqlDataSource> 
    <center> 
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="<%=Request.Url.AbsoluteUri %>" num_posts="2" width="500"></fb:comments>
 </center>
</asp:Content>

